package l1j.server.server.serverpackets;

import java.io.IOException;

import l1j.server.server.model.Instance.L1TrapInstance;

public class S_Trap extends ServerBasePacket {
	public S_Trap(final L1TrapInstance trap, final String name) {

		this.writeC(S_OPCODE_DROPITEM);
		this.writeH(trap.getX());
		this.writeH(trap.getY());
		this.writeD(trap.getId());
		this.writeH(7); // adena
		this.writeC(0);
		this.writeC(0);
		this.writeC(0);
		this.writeC(0);
		this.writeD(0);
		this.writeC(0);
		this.writeC(0);
		this.writeS(name);
		this.writeC(0);
		this.writeD(0);
		this.writeD(0);
		this.writeC(255);
		this.writeC(0);
		this.writeC(0);
		this.writeC(0);
		this.writeH(65535);
		// writeD(0x401799a);
		this.writeD(0);
		this.writeC(8);
		this.writeC(0);
	}

	@Override
	public byte[] getContent() throws IOException {
		return this.getBytes();
	}
}
